Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: wait for password-command to exit #699

Merged
merged 1 commit into from
Jun 22, 2023

Conversation

istudyatuni
Copy link
Contributor

Useful for commands that requires interactive input

tested on Linux

@aawsome
Copy link
Member

aawsome commented Jun 22, 2023

Thanks for the PR - I think this is a good improvment.

It seems to me that this PR doesn't change the wait-behavior. Instead it seem that now only stdout is used to read the password from while stderr is not catched anymore and stdin can now be used to manually input something into the command (instead of forcing the command to abort, which was the previous behavior). Is this correct?
Can you please also add a changelog entry?

@istudyatuni
Copy link
Contributor Author

now only stdout is used to read the password from while stderr is not catched anymore and stdin can now be used to manually input something into the command (instead of forcing the command to abort, which was the previous behavior)

Yes. Also, stderr, for example in keepassxc-cli, is used to show password prompt.

I think maybe it's a good idea to exit, if command exited with non-zero code, will do

@istudyatuni istudyatuni force-pushed the wait-password-command branch 2 times, most recently from 501b79a to 23edcb4 Compare June 22, 2023 18:02
useful for commands that requires interactive input
Copy link
Member

@aawsome aawsome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks a lot again!

@aawsome aawsome merged commit f420717 into rustic-rs:main Jun 22, 2023
@istudyatuni istudyatuni deleted the wait-password-command branch June 22, 2023 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants